package cn.gjxblog.base;

import java.text.SimpleDateFormat;
import java.util.Date;

public class LogUtils {
    public static String getDate() {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        String format = simpleDateFormat.format(new Date());
        return format;
    }

    public static void printThreadInfo(){
        System.out.println("["+ getDate()+"]["+Thread.currentThread().getName()+"]");
    }

    public static String  getThreadInfo(){
        return "["+ getDate()+"]["+Thread.currentThread().getName()+"] ";
    }
}
